
<script>
import {getCurrentInstance, ref} from "vue";


//引入element-icon 图标库
// import {Delete, Edit, Search, Share, Upload} from '@element-plus/icons-vue'

export default {


  setup() {
    let instance = getCurrentInstance();
    let router = instance.appContext.config.globalProperties.$router;


    function addHelloWorld(){
      console.log("点击事件处理函数 /HelloWorld/pc ");
      router.push({path: '/HelloWorld',replace:true});
    }

    function addHellNew(){
      console.log("点击事件处理函数 /HelloWorld/NewMy");
      router.push({path:"/NewMy",replace:true});
    }

    return {
      addHelloWorld,
      addHellNew
    }
  }
}

</script>

<template>

  <div>


    <p v-on:click="addHelloWorld"  style="background-color: aqua;">23</p>
    <p v-on:click="addHellNew" style="background-color: aqua;">345667</p>
    <el-button></el-button>
  </div>


  
  <div>
    <router-view></router-view>
  </div>

 
</template>


<style>

</style>
